package com.ruoyi.repast.service.impl;

import com.ruoyi.repast.entity.BPrivateRoom;
import com.ruoyi.repast.entity.BReserve;
import com.ruoyi.repast.service.BInterfaceService;
import org.nutz.plugin.spring.boot.service.BaseService;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * @author zhangjialu
 * @date 2021/7/31 下午11:23
 */
@Service
public class BInterfaceServiceImpl extends BaseService<BReserve> implements BInterfaceService {

    /**
     *  包间预定信息查询
     */
    @Override
    public List<BReserve> queryReserveList(BReserve dto) {


        List<BReserve> resultList = this.dao().query(BReserve.class, null);
        return resultList;
    }

    /**
     * 包间预定新增
     */
    @Override
    public boolean addReserve(BReserve dto) {
        BReserve save = this.dao().insert(dto);
        return true;
    }

    /**
     * 包间预定修改
     */
    @Override
    public boolean editReserve(BReserve dto) {
        int result = this.dao().updateIgnoreNull(dto);
        return true;
    }


    /**
     * 包间预定删除
     */
    @Override
    public boolean deleteReserve(BReserve dto) {
        int  result = this.dao().updateIgnoreNull(dto);
        return true;
    }
}
